﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SimpleGame.GameObjects.Particles;
using Microsoft.Xna.Framework;

namespace EditorForm
{
    public partial class ParticleEditorControls : Form
    {
        private Emitter emitter;

        public ParticleEditorControls(Emitter emitter)
        {
            this.emitter = emitter;
            InitializeComponent();
        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            int posX = (int)numericUpDown1.Value;
            emitter.EmitterData.EmitterPosition = new Vector2(
                posX, emitter.EmitterData.EmitterPosition.Y);
        }

        private void numericUpDown2_ValueChanged(object sender, EventArgs e)
        {
            int posY = (int)numericUpDown2.Value;
            emitter.EmitterData.EmitterPosition = new Vector2(
                emitter.EmitterData.EmitterPosition.X, posY);
        }
    }
}
